<?php

Yii::import('clientes.models._base.BaseAlergias');

class Alergias extends BaseAlergias {

  /**
   * @return Alergias
   */
  public static function model($className = __CLASS__) {
    return parent::model($className);
  }

  public static function label($n = 1) {
    return Yii::t('app', 'Alergias|Alergiases', $n);
  }

  public function search() {
    $criteria = new CDbCriteria;
    $sort = new CSort;
    $criteria->compare('id_alergias', $this->id_alergias, true, 'OR');
    $criteria->compare('id_persona', $this->id_persona);
    $sort->defaultOrder = 'id_alergias asc';
    return new CActiveDataProvider($this, array(
        'criteria' => $criteria, 'sort' => $sort,
    ));
  }

}
